<!--
 * @FilePath     : /layui/demo/1532.html
 * @Description  : 自定义属性，提交字段的属性。
 * @Date         : 2025-02-24 09:57
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-02-24 09:58
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="" />
  </head>
  <body>
    <div id="demo1" class="xm-select-demo"></div>

    <script src="/xm-select/dist/xm-select.js"></script>
    <script>
      var demo1 = xmSelect.render({
        el: '.xm-select-demo',

        // 1、自定义字段名；
        prop: {
          name: 'label',
          value: 'id',
        },

        // 2、数据格式
        data: [
          { label: '张三', id: 1, group: 1 },
          { label: '李四', id: 2, group: 1 },
          { label: '王五', id: 3, group: 2 },
        ],

        //
        filterable: true,
      })
    </script>
  </body>
</html>
